import ajax from './http'
export const login = params => {
  return ajax.post('/api/user/login', params)
}
export const register = params => {
  return ajax.post('/api/user/register', params)
}
// 获取用户信息
export const getUserInfo = params => {
  return ajax.post('/api/user', params)
}
// 获取所有用户
export const getAllList = params => {
  return ajax.post('/api/user/all', params)
}
// 获取所有动态
export const getAllDynamic = params => {
  return ajax.get('/api/dynamic/all', params)
}
// 发动态
export const subDynamic = params => {
  return ajax.post('/api/dynamic/add', params)
}
// 点赞
export const zan = params => {
  return ajax.post('/api/dynamic/zan', params)
}
// 删除动态
export const delDynamic = params => {
  return ajax.post('/api/user/delete', params)
}
// 修改头像
export const updateAvatar = params => {
  return ajax.post('/api/user/avatar', params)
}
